home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4422 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  625 b 

  1. From: CompuWord@msn.com (Meiyu Lin)
  2. Subject: RE: Newbie question on syntax of pointer to const
  3. Date: 30 Jan 96 04:05:52 -0800
  4. References: <4ej9eg$lq6@agate.berkeley.edu>
  5. Message-ID: <00001a81+00009661@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10. (1)    const double *pc;    
  11.       This is a pointer to a const object of type double.
  12.       *pc = 3.14156  the pointer pc is allowed to change
  13.        
  14. (2)    double const *pc = 3.14156;
  15.       This is the pointer is to be declared as constant
  16.     Since pointer is as constant the value can't be changed.
  17.  
  18. Hope I am right.
  19.  
  20.  
  21.